// 使用mongoDB
const mongoose = require('mongoose')
mongoose.connect('mongodb://localhost/homepage')

mongoose.connection.on('error', (error) => {
  console.error('connect failed:', error)
})

module.exports = mongoose